home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
fweb
/
READ_ME-1.40
< prev
Wrap
Text File
|
1993-12-02
|
9KB
|
189 lines
FWEB version 1.40
October 30, 1993
FWEB v1.40, such as it is, is available from
ftp.pppl.gov:/pub/fweb/fweb-1.40.tar.Z
It contains some bug fixes and various new features, described below.
However, because this version initiates some major upgrades and has been
inadequately debugged, it is NOT RECOMMENDED for new users or for large
programming projects already dependent on a stable FWEB environment. It is
my hope that some experts will play with this version and report their
difficulties, so that a stable version will evolve.
The major points are:
* Documentation standardized on gnu texinfo;
* Full LaTeX support;
* Verbatim `language' and language-independent mode.
MAJOR FEATURES
* Documentation current with v1.40 is now written in texinfo format. The
fweb.texinfo document is not yet as complete as the old fwebman.tex (which
is still supplied, but is frozen at v1.30). However, it is now usefully
TeXable, and the on-line document fweb.info (accessible through emacs' info
browser) is reasonably extensive. For a summary of the features new with
version 1.40, see the info menu item `New features'.
* Previous versions of FWEB did not work entirely gracefully with LaTeX, in
that LaTeX's \output routine was usurped by FWEB. That is no longer the
case; LaTeX's \output routine is now used, as are its sectioning and
table-of-contents commands. Things like footnotes should now work.
The new LaTeX support necessitated major changes to FWEB's macro package
fwebmac.web. An attempt has been made to provide a seamless transition
from previous versions, as follows. Two macro packages are now provided:
fwebmac.sty --- The old v1.30 one, with minimal modifications
required for v1.40.
fwebmacL.sty --- The new macros.
By default, FWEB looks for fwebmac.sty. In order to force FWEB to use the
new macros, you should put into your initialization file .fweb the line
+wfwebmacL.sty
This package is supposed to work with TeX as well as LaTeX. In principle,
the old and new macros should work the same when using TeX. However, when
using LaTeX with the new ones, the appearance of FWEAVE's output will be
noticably different. In particular, it is supposed to look more
`book-like' in appearance. Sections are no longer numbered at the
beginning of the TeX part, but rather when the code part (if any) begins.
Section numbering will be LaTeX's---e.g., 13.1.5, and this will be
reflected in the index and other cross-reference information. The scheme
uses ideas recently discussed in comp.programming.literate, but feedback is
very desirable. Remember, if you don't like the new look, you can for the
time being use TeX instead of LaTeX. I encourage you to use LaTeX, but if
you do, you're stuck with the new look.
There are several difficulties with the new LaTeX support:
(1) Macro expansion in section titles may not work with latex
and/or nlatex. This includes constructions like ``@* {\tt TITLE}.'' and
``@* |function|.'' Some \protect's need to be scattered around. I'll get
to this eventually.
(2) Another unusual behavior is that after an editing change LaTeX
may not warn that section numbering is out of date. If in doubt, or if
question marks appear in place of section numbers, rerun latex.
(3) Finally, the last section of your document should begin
@* INDEX.
where ``INDEX'' is in upper case. This case convention is a kludge (to
force a shift into two-column output) that will be fixed someday.
* This version features the beginnings of some work on language
independence. In principle, it is now possible to weave and tangle
sections of code literally (verbatim) instead of using FWEAVE's
pretty-printing and FTANGLE's blank suppression. One is supposed to be
able to do this both for compiler languages like Fortran or C that FWEAVE
can pretty-print, as well as for any other language (makefiles, etc.) whose
syntax FWEB does not understand. It is certain that these features have
not yet been fully or entirely correctly implemented. The general mechanism is
complex, as it must interact smoothly with FTANGLE's macro preprocessor and
other such features. I STRONGLY RECOMMEND THAT NOBODY BEGIN A LARGE-SCALE
PROGRAMMING PROJECT USING THESE NEW LANGUAGE-INDEPENDENT FEATURES. That
said, I hope people will try it out so problems can be identified and
fixed.
There are two ways of obtaining language independence: a
language-independent `mode' (the `N mode') that can be used even for
languages such as Fortran, and a `verbatim language'. The verbatim
language is the stronger of the two; it turns on the language-independent
mode. The two concepts are closely related, and in some applications they
will function identically.
If you are, say, a Fortran programmer but merely want to turn off
pretty-printing, you should use the N mode. This is done by using the
command-line option `-N'. (Case is significant; `-n' means something
entirely different.) FWEAVE will just print your source in a verbatim
environment, and will continue to do indexing as usual; FTANGLE will copy
the source literally to the output file, say test.f.
If you are using FWEB to document a language different than the supported
ones of C, C++, Fortran, Ratfor, and TeX, then you should select the
verbatim language by means of the language command `@Lv' (replacing
something like `@c', `@n', or `@Lx'). FWEAVE will again print your source
in a verbatim environment, and FTANGLE will copy it to the output file
test.mk. (The `.mk' extension can be changed in the style file.)
The N mode and the verbatim language are supposed to obey the usual
scoping and inheritance rules (modules inherit the features of their
ancestors), so that mixed-language programming still works correctly.
There are probably some difficulties here, however.
Cross-referencing is turned off under `@Lv'. However, FWEAVE still
recognizes identifiers according to FWEB's rules. This does not always
make sense, and in the future a mechanism should be provided for modifying
those rules. (This is tricky because of built-in functions, WEB macros,
etc.) In any event, an index entry for FWEB's current understanding of an
identifier can be forced by means of the `@+' command.
Sharp-eyed users will note that `@+' used to mean something
else---namely, it prevented a line break, as in `x; @+ y;'. That role is
now played by `@~' (which, if you think of TeX, should be easier to
remember). I regret making this change, but the new usage is now symmetric
with the `@-' command, which means delete an index entry. Incidently,
another change that was made in the last version, namely replacing the
compiler directive command `@!' by `@?', now becomes more crucial since
`@!' is now used to suppress expansion of a WEB macro or built-in function.
(This is sometimes particular necessary in the language-independent modes.)
In summary, five important control codes in the current version are
@? --- compiler directive
@~ --- suppress line break
@! --- suppress macro expansion of next identifier
@- --- suppress index entry for next identifier
@+ --- force index entry for next identifier
If you are unwilling to convert old codes and will not be using
language-independent features, it is possible to restore the old meaning of
`@+'; see `New features' of fweb.info. However, I don't recommend this; it
will just cause confusion later.
RELATIVELY MINOR CHANGES
* Built-in functions now begin with '$', not '_'. For example, you should
say `$EVAL(1+2)', not `_EVAL(1+2)'. The underscore convention was a poor
design decision that introduced conflicts with ANSI C in certain cases.
Existing codes will continue to work, as FWEB now understands both
conventions. One can therefore say things like `@#undef _EVAL' (retaining
the functionality of $EVAL), but the underscore convention may go away in
some future release.
* When the `-F' option is used, FTANGLE will write its output to temporary
files and compare the results to the last version in the directory, if any.
The file is updated only if a difference is found. This prevents make
files from recompiling source if only the documentation was changed. This
feature was not entirely trivial to make portable, so please report any
difficulties.
* A new flag `-n)' (reverse Fortran indices) has been added. This may be
very useful for advanced Fortran programming; see fweb.info for its
description.
* The ./configure automatic configuration script has been improved, and should
lead to easy installation on many systems. Please report any difficulties
you have with using this script.
* The following change will be completely invisible to the user (provided
it works correctly), but effects a dramatic simplification for the code
development: the large typedefs.hweb, containing many #defines, is no
longer included into every FWEB source file. Rather, the #defines are
localized into a typedefs.h that is #included into the C source. This
substantially shortens the *.c files and expedites debugging. For the
curious, this procedure makes an interesting use of the verbatim language;
see typedefs.web.